import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';

enum Api {
  overview = 'dashboard/getDashboardData',
}
const prefix = '/jeecgboot';
export default [
  {
    url: prefix + Api.overview,
    timeout: 1000,
    method: 'post',
    response: () => {
      return resultSuccess({
        totalCount: 193,
        totalPrice: 292311,
        deviceOnline: 23,
        deviceOffline: 11,
        deviceTimeList: [
          '20:00',
          '21:00',
          '22:00',
          '23:00',
          '0:00',
          '1:00',
          '2:00',
          '3:00',
          '4:00',
          '5:00',
          '6:00',
          '7:00',
          '8:00',
          '9:00',
          '10:00',
          '11:00',
          '12:00',
          '13:00',
          '14:00',
          '15:00',
          '16:00',
          '17:00',
          '18:00',
          '19:00',
        ],
        deviceOnlineList: [31, 21, 33, 41, 31, 33, 26, 32, 31, 42, 36, 34, 42, 42, 51, 32, 41, 54, 33, 26, 32, 31, 42, 36],
        deviceOfflineList: [11, 23, 13, 2, 11, 11, 16, 13, 11, 5, 8, 14, 12, 12, 11, 12, 4, 24, 8, 14, 12, 12, 11, 12],
        deviceStateNameList: ['在线', '离线', '故障'],
        deviceStateCountList: [19, 8, 4],
        useStateNameList: ['在用', '闲置', '报废', '报废审批', '变更审批', '转移审批', '归还审批'],
        useStateCountList: [12, 41, 10, 4, 12, 6, 8, 17],
      });
    },
  },
] as MockMethod[];
